package com.bye.xiaomi_mall.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 td_order
 *
 * @author ruoyi
 * @date 2025-03-15
 */
public class TdOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 订单号
     */
    @Excel(name = "订单号")
    private String orderCode;

    /**
     * 所属用户
     */
    @Excel(name = "所属用户")
    private Long userId;

    @Excel(name = "用户token")
    private String miUserToken;

    /**
     * 订单总金额
     */
    @Excel(name = "订单总金额")
    private BigDecimal totalMoney;

    /**
     * 实际支付金额
     */
    @Excel(name = "实际支付金额")
    private BigDecimal actualPayMoney;


    private String remark;
    /**
     * 订单状态  0 待支付 1 已支付（待发货）2已发货 3已签收 （待评价） 4已评价   -1 取消
     */
    @Excel(name = "订单状态  0 待支付 1 已支付", readConverterExp = "待=发货")
    private String orderStatus;

    /**
     * 订单支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /**
     * 订单签收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单签收时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receviceTime;

    /**
     * 收货人名称
     */
    @Excel(name = "收货人名称")
    private String consignssName;

    /**
     * 收货手机号
     */
    @Excel(name = "收货手机号")
    private String consignssPhone;

    /**
     * 收货地址
     */
    @Excel(name = "收货地址")
    private String consignssAddress;

    /**
     * 物流单号
     */
    @Excel(name = "物流单号")
    private String logisticsCode;
    List<TdOrderDetail> orderDetailList;

    public List<TdOrderDetail> getOrderDetailList() {
        return orderDetailList;
    }

    public void setOrderDetailList(List<TdOrderDetail> orderDetailList) {
        this.orderDetailList = orderDetailList;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }

    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    public String getMiUserToken() {
        return miUserToken;
    }

    public void setMiUserToken(String miUserToken) {
        this.miUserToken = miUserToken;
    }

    public void setActualPayMoney(BigDecimal actualPayMoney) {
        this.actualPayMoney = actualPayMoney;
    }

    public BigDecimal getActualPayMoney() {
        return actualPayMoney;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setReceviceTime(Date receviceTime) {
        this.receviceTime = receviceTime;
    }

    public Date getReceviceTime() {
        return receviceTime;
    }

    public void setConsignssName(String consignssName) {
        this.consignssName = consignssName;
    }

    public String getConsignssName() {
        return consignssName;
    }

    public void setConsignssPhone(String consignssPhone) {
        this.consignssPhone = consignssPhone;
    }

    public String getConsignssPhone() {
        return consignssPhone;
    }

    public void setConsignssAddress(String consignssAddress) {
        this.consignssAddress = consignssAddress;
    }

    public String getConsignssAddress() {
        return consignssAddress;
    }

    public void setLogisticsCode(String logisticsCode) {
        this.logisticsCode = logisticsCode;
    }

    public String getLogisticsCode() {
        return logisticsCode;
    }

    @Override
    public String toString() {
        return "TdOrder{" +
                "id=" + id +
                ", orderCode='" + orderCode + '\'' +
                ", userId=" + userId +
                ", miUserToken='" + miUserToken + '\'' +
                ", totalMoney=" + totalMoney +
                ", actualPayMoney=" + actualPayMoney +
                ", remark='" + remark + '\'' +
                ", orderStatus='" + orderStatus + '\'' +
                ", payTime=" + payTime +
                ", receviceTime=" + receviceTime +
                ", consignssName='" + consignssName + '\'' +
                ", consignssPhone='" + consignssPhone + '\'' +
                ", consignssAddress='" + consignssAddress + '\'' +
                ", logisticsCode='" + logisticsCode + '\'' +
                ", orderDetailList=" + orderDetailList +
                '}';
    }
}
